package com.example.opengl.player.extractor

import android.media.MediaFormat
import com.example.opengl.player.base.IExtractor
import java.nio.ByteBuffer

class AudioExtractor(path: String) : IExtractor {
    private val mExtractor = MMExtractor(path)

    override fun getFormat(): MediaFormat? {
        return mExtractor.getAudioFormat()
    }

    override fun readBuffer(byteBuffer: ByteBuffer): Int = mExtractor.readBuffer(byteBuffer)

    override fun getCurrentTimestamp(): Long = mExtractor.getCurrentTimestamp()

    override fun getSampleFlag(): Int = mExtractor.getCurrentTimeFlag()

    override fun seek(pos: Long): Long = mExtractor.seek(pos)

    override fun setStartPos(pos: Long) = mExtractor.setStartPos(pos)

    override fun stop() = mExtractor.stop()
}